package xian.woniuxy.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xian.woniuxy.dao.GoodsTypeMapper;
import xian.woniuxy.entity.GoodsType;
import xian.woniuxy.service.IGoodsTypeService;

import java.util.List;

/**
 * @author ljy
 * @time 2021/12/25 13:20:36
 */
@Service
@Transactional
public class GoodsTypeServiceImpl implements IGoodsTypeService {

    @Autowired
    private GoodsTypeMapper goodsTypeMapper;

    @Override
    public void save(GoodsType goodsType) {
        goodsTypeMapper.save(goodsType);
    }

    @Override
    public void delete(int type_id) {
        goodsTypeMapper.delete(type_id);
    }

    @Override
    public void update(GoodsType goodsType) {
        goodsTypeMapper.update(goodsType);
    }

    @Override
    public List<GoodsType> getAll() {
        return goodsTypeMapper.getAll();
    }

    @Override
    public  List<GoodsType> getOne(int type_id) {
        return goodsTypeMapper.getOne(type_id);
    }
}
